package com.career.syn.web;

/**
 * 
* @ClassName: Resp
* @Description: 返回对象
* @author georgeli
* @date 2018年7月3日 下午1:20:10
 */
public class Resp<T> {
	
	/*
	 * 请求ID
	 */
	private String requestId;

	/*
	 * 返回成功或异常代码
	 */
	private int code;
	
	/*
	 * 返回简要信息
	 */
	private String message = "success";
	
	/*
	 * 返回的数据对象
	 */
	private T result;
	
	public Resp() {
		super();
	}
	
	public Resp(int _code, String _message) {
		this.code = _code;
		this.message = _message;
	}

	public Resp(int _code, String _message, T t) {
		this(_code, _message);
		this.result = t;
	}
	
	public Resp(String _requestId, int _code, String _message) {
		this.requestId = _requestId;
		this.code = _code;
		this.message = _message;
	}
	
	public Resp(String _requestId, int _code, String _message, T t) {
		this(_requestId, _code, _message);
		this.result = t;
	}

	public String getRequestId() {
		return requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

}
